import { defineStore, createPinia } from "pinia";
export const useGlobalStore = defineStore({
  id: "globalState",
  state: () => ({
    settingVisible: false,
    routes: [
      {
        path: "/home",
        meta: {
          title: "首页",
        },
      },
    ],
  }),
  getters: {
    getRoute(state) {
      return state.routes;
    },
  },
  actions: {
    setSettingVisible(visible: Boolean) {
      this.settingVisible = visible;
    },
  },
});

const pinia = createPinia();
export default pinia;
